home *** CD-ROM | disk | FTP | other *** search
- Path: overload.lbl.gov!news
- From: Mikhail Faiguenblat <mfaiguen@issserv4.lbl.gov>
- Newsgroups: comp.lang.c
- Subject: Re: Locaton of an array?
- Date: 12 Jan 1996 21:23:18 GMT
- Organization: Lawrence Berkeley Laboratory, Berkeley CA
- Message-ID: <4d6jg6$4gg@overload.lbl.gov>
- References: <4d4iqk$hs3@overload.lbl.gov> <maverickDL1u3x.45I@netcom.com>
- NNTP-Posting-Host: issserv4.lbl.gov
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4d)
- X-URL: news:maverickDL1u3x.45I@netcom.com
-
- maverick@netcom.com (Chris Shepard) wrote:
- >Hi,
- > Haven't actually coded this in a long time, but try....
- >
- >#include <the usual stuff>
- >
- >int main(void)
- >{
- > char arr[10],
- > *p;
- >
- > p=arr;
- > printf("addr of arr = %p\n",p);
- > return(EXIT_SUCCESS);
- >}
-
- Hmm, I still think it is not a physical memory address because it gives
- numbers like ffffffc0. Is there a register I can look at to find the real
- address?
-
- >Btw, just out of curiosity, why do you care where it lives in
- >absolute RAM?
- >
- > Cheers.
- >
-
- Well, I have a DOS program (C with inline assembly) which uses DMA to get
- images from a camera. The way it was written is that it stores images directly
- above first 640K.
-
- I have to port this program to Windows, and this means that I can't assume that
- this chunk of memory is free--there might be some other program using it.
- However, for DMA I must specify a physical address to which data from camera
- is copied.
-
- What I want to do is to call the function which retrieves a single image
- with a pointer to an array, and it would store an image at that location.
- That is why I need to know where this array is in RAM.
-
- I am not sure if this is the best way, so if anyone can think of something
- better I'd appreciate if you let me know.
-
- Thanks.
-
- MIkhail
-
-